<?php
header('content-type:text/html; charset=utf-8');
session_start();
if(!isset($_SESSION['user'])){
	header('Refresh:2;url=/login.html');
	die('<h3>请先登录</h3><a>返回重新登录</a>');
}

header('content-type:text/html; charset=utf-8');
@$id=$_REQUEST['id'];
@$name=$_REQUEST['name'];
echo $id;
echo $name;

$pdo=new PDO('mysql:dbname=mydb;charset=utf8','root');
$stat=$pdo->prepare('select id,name from person where name=:name');
$stat->execute(array('name'=>$name));
$data=$stat->fetchAll(PDO::FETCH_NAMED);
var_dump($data);


?>
	
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 模板</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->

</head>
<body>
<div class="row">
<div class="col-xs-12">
<div class="col-xs-3 col-xs-offset-4">
<nav class="navbar navbar-default">
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
					 <div class="input-group">
					 <input id="password" class=" form-control" placeholder="搜索"></input>
					 		<div class="input-group-addon">
					 				<a data-toggle="modal" data-target="#inp"><span class="glyphicon glyphicon-search"></span></a>
					 				</div>
					 				</div>
				                    </div>
					 						</form>
					 						<ul class="nav navbar-nav ">
					 						<li class="dropdown">
					 								<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th-list"> </span>通讯录</a>
	          <ul class="dropdown-menu">
	          <li><a href="tongxunlu2.php">添加列表</a></li>
	          <li class="divider"><a href="#"></a></li>
	          <li><a href="#">退出列表</a></li>

	          </ul>
	          		</li>
	          		</ul>
	          		</nav>
	          		</div>
	          		</div>
	          		</div>
	          		<div class="row">
	          		<div class="col-xs-3 col-xs-offset-4">
	          		<div class="panel panel-default">
   		  <div class="panel-heading">
   			<div class="panel-title" >通讯录列表</div>
   			</div>
   			 <div class="list-group ">
   			 <div class="list-group-item list-group-item-default"><span class="glyphicon glyphicon-user">蒲大大</span ></div>
			<div class="list-group-item"><span class="glyphicon glyphicon-user"></span>王小虎</div>
			<div class="list-group-item"><span class="glyphicon glyphicon-user"></span>小葡萄</div>
			</div>
			</div>
			</div>
			</div>
			 
			</body>
</html>
